<! Controller -->
<?php
	require_once ('../../models/ProductCategory.php');
	require_once ('../../models/Users.php');
	session_start();
	$response = ProductCategory::GetAll();
?>

<! View -->
<!DOCTYPE html>
<html lang="en">
	<?php include('../../inc/head.php'); ?>
	<body>
		<div>
			<?php include('../../inc/nav.php'); ?>

				
			<div id="content">
				<table class = "table table-bordered table-condensed table-hover table-striped">
					<tr>
						<th>Name</th><th>Actions</th>
					</tr>
					
					<?php while($row = $response->fetch_assoc()): ?>
						<tr>
							<td><?=$row['Name']?></td>
							<td>
								<a href="details.php?id=<?=$row['id']?>">Details</a>
								<a href="edit.php?id=<?=$row['id']?>">Edit</a>
								<a href="delete.php?id=<?=$row['id']?>">Delete</a>
							</td>				
						</tr>
					<?php endwhile; ?>
					
					<tr>
						<td><a href="create.php">Insert</a></td>
					</tr>
				
				</table>
			</div>
			<?php include('../../inc/footer.php'); ?>
		</div>
	</body>
</html>
